#ifndef _ZMANAGEMENT_H_
#define _ZMANAGEMENT_H_

#include "ZMatrices.h"
#include "ZCamera.h"
#include "3rdCamera.h"

#include "ZLights.h"

#include "ZCommonModel.h"

#include "ZGrid.h"
#include "ZCharEditor.h"
#include "ZCharEditManage.h"

class ZCell;

class ZManagement
{
public:
	static ZManagement& GetInstance();

	HRESULT Init();
	VOID Update();

	VOID UpdateCamera();

	VOID Draw();
	VOID CleanUp();

	VOID FrameUpdate();

	

	

private:
	VOID SavePallete( WCHAR* a_pFileName );
	//VOID LoadPallete( WCHAR* a_pFileName );

	ZManagement(VOID);
	~ZManagement(VOID);

	FLOAT m_fFrameTime;

	POINT m_MousePos;
	POINT m_MousePosOld;
	BOOL  m_bRButtunPush;

	ZMatrices m_Matrices;
	ZCamera m_Camera;
	CCamera m_CameraThird;
	ZLights m_Lights;
	ZGrid m_Grid;
	ZCharEditManage m_CharEdit;

	LPD3DXFONT m_pFont;

	CHAR m_chBuffer[1024];
	FLOAT m_Fps;
	WCHAR m_chFps[15];

	INT m_iNowHeightMapNum;
	INT m_iNowTexutreNum;

	FLOAT m_fCharEditorPitchAngle;
	FLOAT m_fCharEditorYawAngle;

	ZCell* m_pCell;

	FLOAT m_fCameraZoom;
	FLOAT m_fCameraY;

	
};

#endif